#
# Parser class for parsing bounces
#
package Mail::BounceParser;

use MIME::Parser;
use Mail::Bounce;

@ISA = qw(MIME::Parser);

sub new {
    my $class = shift;
    my $self = new MIME::Parser;
    bless $self, $class;
}

sub parse {
    my $self = shift;
    my $res = $self->SUPER::parse(@_);
    if ($res) {
	bless $res, Mail::Bounce;
	$res->classify();
    }
    return $res;
}
